package com.yjc.drygoods.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yjc.common.utils.PageUtils;
import com.yjc.drygoods.member.entity.MemberReceiveAddressEntity;
import com.yjc.drygoods.member.vo.FareVo;

import java.util.List;
import java.util.Map;

/**
 * 会员收货地址
 *
 * @author yjc
 * @email yjc19979401754@126.com
 * @date 2022-08-19 23:16:26
 */
public interface MemberReceiveAddressService extends IService<MemberReceiveAddressEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 根据会员id获取所有收货地址
     *
     * @param memberId
     * @return
     */
    List<MemberReceiveAddressEntity> getMemberAddress(Long memberId);

    /**
     * 根据会员地址id获取会员收货地址详细信息
     *
     * @param addrId
     * @return
     */
    FareVo getFare(Long addrId);

    void updateDefaultAddress(Long addressId);

    void deleteAddressAndKeepDefault(Long addressId);
}

